﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using NextInventory.Common;
using NextInventory.Model.CashPaid;
using NextInventory.Model.CashReceived;
using NextInventory.Model.Order;
using NextInventory.Model.Purchase;
using NextInventory.Model.Sale;

namespace NextInventory.Model.Party
{
    public class PartyModel : BaseViewModel
    {
        public int PartyId { get; set; }

        [Required(ErrorMessage = "First name is required")]
        [Display(Name = "First name:")]
        public string FirstName { get; set; }

        [Required(ErrorMessage = "Last name is required")]
        [Display(Name = "Last name:")]
        public string LastName { get; set; }

        [Display(Name = "Phone #:")]
        [DataType(DataType.PhoneNumber)]
        public string Phone { get; set; }

        [Required(ErrorMessage = "Email is required")]
        [Display(Name = "Email:")]
        [DataType(DataType.EmailAddress)]
        public string Email { get; set; }

        [Required(ErrorMessage = "Address is required")]
        [Display(Name = "Address:")]
        public string Address { get; set; }
        [Required(ErrorMessage = "City name required")]
        [Display(Name = "City:")]
        public string City { get; set; }
        [Required(ErrorMessage = "Country name is required")]
        [Display(Name = "Country:")]
        public string Country { get; set; }
        [Required(ErrorMessage = "Credit limit is required.")]
        [Display(Name = "Credit limit:")]
        public decimal CreditLimit { get; set; }
        [Required(ErrorMessage = "Select mode of payment")]
        [Display(Name = "Mode of Payment:")]
        public int ModeOfPaymentId { get; set; }
        [Required(ErrorMessage = "Select party status")]
        [Display(Name = "Party Status:")]
        public int PartyStatusId { get; set; }

        public List<ModeOfPayment> ModeOfPay { get; set; }
        public List<CashPaidModel> CashPaids { get; set; }
        public List<CashReceivedModel> CashRecieveds { get; set; }
        public string ModeOfPayment { get; set; }
        //public ModeOfPayment ModeOfPayment { get; set; }
        public List<OrderModel> Orders { get; set; }
        public string PartyStatus { get; set; }
        //public PartyStatus PartyStatus { get; set; }
        public List<PurchaseModel> Purchases { get; set; }
        public List<PurchaseReturnModel> PurchaseReturns { get; set; }
        public List<SaleModel> Sales { get; set; }
        public List<SaleReturnModel> SaleReturns { get; set; }

        public PartyModel()
        {

        }

    }
}